package com.pocketsweet.model;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVObject;
import com.pocketsweet.C;
import com.pocketsweet.service.UserService;

@AVClassName("MLWithdraw")
public class MLWithdraw extends AVObject {
	// //////////////////////////////////////////
	// 常量
	// //////////////////////////////////////////
	public static final String USER = "user";// 用户
	public static final String SUM = "sum";// 申请金额
	public static final String STATUS = "status";// 处理状态,0未处理，1已支付，2成功，3取消
	public static final String ALIPAY_ACCOUNT = "alipay_account";// 阿里账号

	public MLWithdraw() {
		setUser(UserService.getCurrentUser());
		setStatus(C.WITHDRAW_STATUS_WAIT_PAY);
	}

	// get set
	public int getSum() {
		return super.getInt(SUM);
	}

	public void setSum(int value) {
		super.put(SUM, value);
	}

	public Integer getStatus() {
		return super.getInt(STATUS);
	}

	public void setStatus(int value) {
		super.put(STATUS, value);
	}

	public String getAlipay() {
		return super.getString(ALIPAY_ACCOUNT);
	}

	public void setAlipay(String value) {
		super.put(ALIPAY_ACCOUNT, value);
	}

	// //////////////////////////////////////////
	// 外键 申请人 1:1
	// //////////////////////////////////////////
	public MLUser getUser() {
		return (MLUser) super.getAVUser(USER);
	}

	public void setUser(MLUser user) {
		super.put(USER, user);
	}
}
